<%-- 
    Document   : cadastroFuncionario
    Created on : Nov 13, 2011, 1:00:44 AM
    Author     : Jun
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html>
    
    <body><div id="container"><div id="content">
        <%@include file="topo.jsp" %>
        <%@ page import="br.objetos.*, java.util.*" %>
        <table border="0" cellspacing="5" cellpadding="5" width="100%">
            <tr>
                <th >
                    <%@include file="abalateral.jsp" %>
                </th>
            </tr><tr>
                <th align ="left">
                      <h1>Cadastro de Funcionarios</h1>
                       <%
                            FuncionarioMetodos fm = new FuncionarioMetodos();
                            fm.buscarCargos();
                            if (request.getParameter("inserted") != null) {
                                fm = (FuncionarioMetodos) session.getAttribute("funcionario");
                        %>
                        <p>Funcionario <%= fm.getPessoa().getNome() %> inserida com sucesso.</p>
                        <%
                            }
                        %>
                    <form action="cadastroFuncionarioDo.jsp" method="post">
                        <table border="0" cellspacing="2">
                            <tr>
                                <th align="right">CPF: </th>
                                <th><input type="text" name="cpf" size="60"><th/>
                            </tr>
                            <tr>
                                <th align="right">Nome: </th>
                                <th><input type="text" name="nome" size="60"><th/>
                            </tr>
                            
                            <tr>
                                <th align="right">Endereço: </th>
                                <th><input type="text" name="endereco" size="60"><th/>
                            </tr>
                            <tr>
                                <th align="right">Telefone: </th>
                                <th><input type="text" name="telefone" size="60"><th/>
                            </tr>
                            <tr>
                                <th align="right">Email: </th>
                                <th><input type="text" name="email" size="60"><th/>
                            </tr>
                            <tr>
                                <th align="right">Cargo: </th>
                                <th align="left">
                                     <select name="cargo">
                                        <%
                                        List listaS = new ArrayList();
                                            listaS = fm.getListaSalario();
                                        for (Iterator it = listaS.iterator(); it.hasNext();) {
                                                Salario salario= (Salario) it.next();
                                         %>
                                    <option value="<%=salario.getCargo()%>"><%=salario.getCargo()%>
                                         <% 
                                        }
                                         %>
                                    </select>
                                </th>
                            </tr>
                            <tr>
                                <th>
                                    
                                </th>
                                <th>
                                    <input type="submit" value="Cadastrar" />
                                </th>
                                   
                                    
                            </tr>
                            
                        </table>
                    </form>
                </th>
            </tr>
        </table>
            
        
    </div><div id="footer" align="center"><%@include file="footer.jsp" %></div></div></body>
</html>

